<script>
$(function() {
	$( "#tabs" ).tabs({
	    select: function(event, ui) {
	        var url = $.data(ui.tab, 'load.tabs');
	        if( url ) {
	            location.href = url;
	            return false;
	        }
	        return true;
	    },
	selected: 1
	});
});
</script>
<div id="tabs">
	<ul>
            <li><?php echo $html->link('Phong trào chi đoàn',array('controller'=>'phongtraocbs','action'=>'index',$user['Z1user']['chidoansv_id']));?></li>
            <li><a href='#pt'>Thành tích chi đoàn</a> </li>
           <li><?php echo $html->link('Thêm thành tích',array('controller'=>'thanhtichcbs','action'=>'add',$phongtrao['Phongtraocb']['id']));  ?></li>
    </ul>
 <div class="index">
<h2 style="text-align: center"><?php __('Thành tích tham gia của chi đoàn');?></h2>
<h3 align="center"><?php echo 'Tên phong trào: '.$phongtrao['Phongtraocb']['tenphongtrao']?></h3>
<?php //echo $html->link('Thêm thành tích',array('controller'=>'thanhtichcbs','action'=>'add',$phongtrao['Phongtraocb']['id'])); ?>
<?php echo $form->create('Thanhtichcb');?>
	<div id='index'>
	<table cellpadding="0" cellspacing="0" id="tables">
	<tr>
			<th><?php echo "STT"?></th>
			<th><?php echo 'Cán bộ';?></th>
			<th><?php echo 'Thành tích';?></th>
			<th><?php echo 'Ghi chú';?></th>
			<th class="actions"><?php __('Thao tác');?></th>
	</tr>
	<?php
	$i = 0;
	foreach ($thanhtichcbs as $thanhtichcb):
		$class = null;
		if ($i++ % 2 == 0) {
			$class = ' class="altrow"';
		}
	?>
	<tr<?php echo $class;?>>
		<td><?php echo $i; ?>&nbsp;</td>
		<td>
			<?php echo $thanhtichcb['Canbo']['hoten']; ?>
		</td>
		<td><?php echo $thanhtichcb['Thanhtichcb']['thanhtichcb']; ?>&nbsp;</td>
		<td><?php echo $thanhtichcb['Thanhtichcb']['ghichu']; ?>&nbsp;</td>
		<td class="actions">
			<?php echo $html->link('Sửa',array('action'=>'edit',$thanhtichcb['Thanhtichcb']['id'],$thanhtichcb['Thanhtichcb']['phongtraocb_id'])); ?>
			<?php echo $html->link('Xóa',array('action'=>'delete',$thanhtichcb['Thanhtichcb']['id'],$thanhtichcb['Thanhtichcb']['phongtraocb_id']), null, sprintf(__('Bạn muốn xóa thành tích của cán bộ # %s?', true), $thanhtichcb['Canbo']['hoten']));?>
		</td>
	</tr>
<?php endforeach; ?>
	</table>
	<p>
	<?php
	echo $this->Paginator->counter(array(
	'format' => __('Trang %page%/%pages%, hiện có %count% mẫu tin', true)
	));
	?>	</p>

	<div class="paging">
		<?php echo $this->Paginator->prev('<< ' . __('Trước', true), array(), null, array('class'=>'disabled'));?>
	 | 	<?php echo $this->Paginator->numbers();?>
 |
		<?php echo $this->Paginator->next(__('Sau', true) . ' >>', array(), null, array('class' => 'disabled'));?>
	</div>
	
	</div>

<?php echo $form->end();?>
</div>